package com.dmitriyp.movie.mapping;

/**
 * @author Dmitriy
 *
 */
public enum Format {

    VHS("VHS"), DVD("DVD"), BLU_RAY("Blu-Ray");

    private String name;

    private Format(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    @Override
    public String toString() {
        return name;
    }
    
    public static Format getFormat(String value) {
    	for(Format format : values()) {
    		if(format.name.equals(value))
    			return format;
    	}
    	return VHS;
    }
}
